Repository navigation
Feat/desktop app - #546
Open
zfoong wants to merge 5 commits into
Open
Feat/desktop app#546zfoong wants to merge 5 commits into
zfoong wants to merge 5 commits into
Conversation
A native desktop app (Rust, Tauri 2, system webview) that shows the UI the running agent serves, in its own window with a tray icon. It installs CraftBot when missing, starts it when stopped, and keeps the agent running when the window is closed. Agent Apps, downloads, links, notifications and camera/microphone requests work as in a browser. - desktop/: the app (window, tray, install/start page, permissions). - launcher/core/: the setup window's install, start and state code, moved into a library both apps share. The setup window is unchanged. - craftbot.py: `open` and `start` open the app instead of a browser tab when it is installed; CRAFTBOT_DESKTOP_APP names another executable or turns this off. - UI: system notifications for replies, questions and errors while the app's window is in the background (desktop app only). - desktop.yml: tests and builds on Linux, Windows and macOS; on a v* tag, signs the installers and attaches them to the release. - release.yml, bundle.sh: read MIN_MACOS from its new path. Signed-off-by: zfoong <tham_yikfoong@outlook.com>
A tray checkbox starts the app at sign-in, in the tray (--hidden). Off
until turned on. Opened at login, the app leaves starting the agent to
CraftBot's own login item, and starts it only once its window opens.
The entry is the app's own ("CraftBot Desktop" on Windows and Linux,
dev.craftos.craftbot on macOS), written with auto-launch directly:
tauri-plugin-autostart writes the path unquoted, which breaks on paths
with spaces.
Tauri's Windows uninstaller deletes the Run value named after the
product, "CraftBot", which is the agent's own login entry. An
uninstaller hook keeps it and removes the app's entry instead.
Signed-off-by: zfoong <tham_yikfoong@outlook.com>
Collaborator
Author
|
Review but not merge yet |
- Read craftbot.pid beside craftbot.py when the state root has none, so a running pre-1.4.5 install is not seen as stopped and restarted on Start. - Show the UI only once /api/session-token answers 200 (falling back after 60 polls), instead of as soon as the agent reports running, which showed "backend isn't responding" on first start.
ahmad-ajmal
added a commit
that referenced
this pull request
Dec 2, 2026
…ting Desktop app (review of #546): - Windows release: bundle with --no-binary-patching so the signed app exe is not rewritten (and its signature voided) before it is packed. - Windows paths: std::path::absolute instead of fs::canonicalize, which produced \\?\ paths for every craftbot.py run. - Windows install folder: product "CraftBot Desktop" on Windows (tauri.windows.conf.json), apart from CraftBot's data root; craftbot.py finds it through the folder the installer records; hooks.nsh simplified. - The window follows CraftBot's UI address (ui.json ports, a second launch naming another CraftBot) instead of a showing/not-showing flag. - The UI readiness check tries every address localhost resolves to (::1 first on macOS), and the Open CraftBot button records what it shows so the poll does not reload it. - auto-launch pinned to =0.6.0 (the app quotes the path itself). - Workflow: contents: read by default, write only for the attach job. - craftbot.py hand-over: the app no longer inherits CRAFTBOT_HOME; macOS uses `open -n` so a running app receives the arguments; the browser opens when the app does not start, and Linux without a display keeps it. Installer: a Kanban Board registry entry whose folder is gone (the data folder removed by hand or by the legacy uninstaller) is forgotten with `agent-app <path> forget` and installed afresh, instead of failing the required default-agent-app stage on every retry. UI: the splash reads "init received" from the store. It came from a listener the WebSocket provider adds after the first render, so an init that arrived sooner was missed and the splash showed "backend isn't responding" after 90 seconds on a fresh install. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ting Desktop app (review of #546): - Windows release: bundle with --no-binary-patching so the signed app exe is not rewritten (and its signature voided) before it is packed. - Windows paths: std::path::absolute instead of fs::canonicalize, which produced \\?\ paths for every craftbot.py run. - Windows install folder: product "CraftBot Desktop" on Windows (tauri.windows.conf.json), apart from CraftBot's data root; craftbot.py finds it through the folder the installer records; hooks.nsh simplified. - The window follows CraftBot's UI address (ui.json ports, a second launch naming another CraftBot) instead of a showing/not-showing flag. - The UI readiness check tries every address localhost resolves to (::1 first on macOS), and the Open CraftBot button records what it shows so the poll does not reload it. - auto-launch pinned to =0.6.0 (the app quotes the path itself). - Workflow: contents: read by default, write only for the attach job. - craftbot.py hand-over: the app no longer inherits CRAFTBOT_HOME; macOS uses `open -n` so a running app receives the arguments; the browser opens when the app does not start, and Linux without a display keeps it. Installer: a Kanban Board registry entry whose folder is gone (the data folder removed by hand or by the legacy uninstaller) is forgotten with `agent-app <path> forget` and installed afresh, instead of failing the required default-agent-app stage on every retry. UI: the splash reads "init received" from the store. It came from a listener the WebSocket provider adds after the first render, so an init that arrived sooner was missed and the splash showed "backend isn't responding" after 90 seconds on a fresh install.
ahmad-ajmal
force-pushed
the
feat/desktop-app
branch
from
December 2, 2026 14:11
2ba8ce5 to
b2b3bd3
Compare
Closing the window hides it to the tray. On macOS a full-screen window has a Space of its own, and hiding the window does not remove it, so the screen went black. The window now leaves full screen first and is hidden once AppKit posts NSWindowDidExitFullScreenNotification; showing it again in the meantime keeps it on screen.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why?
Created a Tauri based desktop app. With option to auto launch on startup. Intend to replace the web browser based craftbot (still available and the default if installed using clone). npm install available at https://www.npmjs.com/package/craftbot.
Note: require code-signing on Windows and Mac